<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'HouseholdRepair.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<!-- <link rel="stylesheet" type="text/css" href="css/easyui.css">
<link rel="stylesheet" type="text/css" href="css/icon.css">
<link rel="stylesheet" type="text/css" href="css/demo.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easyui.min.js"></script> -->

		<link rel="stylesheet" type="text/css" href="../../WEB-INF/jquery-easyui-1.3.3/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../WEB-INF/jquery-easyui-1.3.3/themes/icon.css">
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/jquery.easyui.min.js"></script>

<script type="text/javascript">
        	
    var xmlhttp; //核心对象; 
	function createXMLHttp() {
		//这个函数用来创建一个 核心对象XmlHttpRequest 根据浏览器的不同，创建不同的
		if (window.XMLHttpRequest) {
			xmlhttp = new XMLHttpRequest();
		} else {
			xmlhttp = new ActiveXObject("MSXML2.XMLHTTP"); //IE浏览器
		}
	}

    function modifystudent(id,studentNumber) {
        $("#model").css("display","block");
        $("input[name='id']").val(id);
        $("input[name='studentNumber']").val(studentNumber);
    }
</script>
</head>

<body>
	<center>
		<div style="height:96%;width: 100% padding-top:30px;">
		<table id="dg" title="" class="easyui-datagrid"  data-options="fitColumns:true,fit:true,rownumbers:true,pagination:true,url:'/business/selectstudent',method='post'">
			<thead>
				<tr>
					<th data-options="field:'id',width:60,align:'center'">编号</th>
					<th data-options="field:'build_no',width:60,align:'center'">姓名</th>
					<th data-options="field:'room_no',width:60,align:'center'">教师号</th>
					<th data-options="field:'room_no',width:60,align:'center'">专业</th>
					<th data-options="field:'fee',width:60,align:'center'">学生上限</th>
				</tr>
</thead>
			<tbody>
				<c:forEach items="${list}" var="s">
				<tr>

				<th ><c:out value="${s.id}"></c:out></th>
					<th ><c:out value="${s.name}"></c:out></th>
					<th ><c:out value="${s.no}"></c:out></th>
					<th ><c:out value="${s.major}"></c:out></th>
					<th ><c:out value="${s.studentNumber}"></c:out></th>
					<th ><a href="javascript:modifystudent('${s.id}','${s.studentNumber}')" class="easyui-linkbutton">修改</a></th>
				</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
		<div id="model"style="display:none;">
			<div class="easyui-panel" title="修改个人信息" style="width:250px;padding:10px;">
				<form id="ff" action="/business/modifyTeacher" method="post">
					<table>
						<tr>
							<td>编号:</td>
							<td><input name="id" type="text" readonly></input></td>
						</tr>
						<tr>
							<td>学生上限:</td>
							<td><input name="studentNumber" type="text"></input></td>
						</tr>
					</table>
					<div style="text-align:center;padding:5px">
						<input type="submit" value="确认修改"/>
						<!--  <a href="javascript:void(0)" class="easyui-linkbutton" onclick="">确认修改</a> -->
						<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">取消</a>
					</div>
				</form>

			</div>

		</div>

	</center>
</body>
</html>
